package com.song.controller;

import com.song.util.GeoRedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GeoController {
    @Autowired
    private GeoRedisUtil redisUtil;
    @PostMapping("/geoAdd")
    public Object geoAdd(String key, double longitude, double latitude, String member){
        Long l = redisUtil.geoAdd(key, longitude, latitude, member);
        return l;
    }

    @PostMapping("/geoPos")
    public Object geoPos(String key, String member){
        return redisUtil.geoPos(key, member);
    }

    @PostMapping("/geoHash")
    public Object geoHash(String key, String member){
        return redisUtil.hash(key, member);
    }
}
